All Functions of Week 7

geom_histogram

{GGPLOT2}

Generates a histogram

sd

{stats}

Get standard deviation of a vector

with

{base}

evaluate expression in the context of a data frame

str

{utils}

Get the structure of an R object

class

{base}

Retrieve class of an R object

tapply

{base}

Create statistical summaries by group based on the levels of one or several factors

lprop

{questionr}

Display row percentages of a two-way frequency table

setwd

{base}

Set Working Directory

cor

{stats}

Calculate Correlation Matrix

par

{graphics}

Set parameters of the plotting device

which

{base}

return indexes of TRUE entries of a logical vector

get_mode

{rstatix}

Compute the mode in a given vector.

seq

{base}

Create a sequence

table

{base}

Obtain frequency table of a variable/cross-tabulation of two variables

aes

{GGPLOT2}

Construct aesthetic mapping of a ggplot graph

boxplot

{graphics}

Plot a simple box plot

scale_y_continuous

{GGPLOT2}

Customise continuous y axis

tabulate

{base}

Counts the number of times each integer occurs in an integer-only vector

round

{base}

Rounds numbers

as.numeric

{base}

Coerce a vector to numeric

ggtitle

{GGPLOT2}

Generates a title for a ggplot graph

which.max

{base}

return index of the largest value in a vector

as.factor

{base}

Coerce a vector to factor

chisq.test

{stats}

Chi-Squared test (e.g. for cross-tabulations)

order

{base}

Get indexes that will sort a vector

addmargins

{stats}

Puts Arbitrary Margins on Multidimensional Tables or Arrays

attach

{base}

Attach Set of R Objects to Search Path

cor.test

{stats}

Test for Association/Correlation Between Paired Samples

barplot

{graphics}

Plot a simple bar plot

unique

{base}

get unique elements

hist

{graphics}

Plot a simple histogram

prop.table

{base}

Transform frequency table into table of proportions

xlab

{GGPLOT2}

Label the x axis (ggplot)

mean

{base}

Get mean of a vector

library

{base}

Load an R package

factor

{base}

Create a factor

scale_x_continuous

{GGPLOT2}

Customise continuous x axis

ggplot

{GGPLOT2}

Create a ggplot graph

c

{base}

Combine values/vectors into a vector

ylab

{GGPLOT2}

Label the y axis (ggplot)

read.spss

{foreign}

Read a .sav file (SPSS data)

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

plot

{graphics}

Generic function from base R to produce a plot

The end!